﻿<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" xmlns:Minutes="clr-namespace:PomodoroMinutes"
        xmlns:Models="clr-namespace:PomodoroMinutes.Models" x:Class="PomodoroMinutes.MainWindow"
        Title="25minutes"  Width="140" Height="180" WindowStyle="None" AllowsTransparency="True" Background="Transparent" MouseDown="DraggingWindow" Topmost="True" MouseDoubleClick="RegisterDisturbance" ResizeMode="NoResize">
	<Window.Resources>
		<Storyboard x:Key="ShowNumberTag"> 
            <DoubleAnimation From="-30" To="0" Duration="00:00:1.5"  Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="numericTag">
                <DoubleAnimation.EasingFunction >
                    <BounceEase Bounces="3" EasingMode="EaseOut" />
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
		</Storyboard>
	</Window.Resources>
    <Window.DataContext>
        <Models:MinutesViewModel/>
    </Window.DataContext>
        
    <Grid x:Name="LayoutRoot" Margin="0,20,0,0">
        <Grid.BitmapEffect>
            <DropShadowBitmapEffect  Color="Gainsboro"  Opacity="0.4"  Softness="2" ShadowDepth="0"/>
        </Grid.BitmapEffect>
		<Canvas ClipToBounds="True">
			<Canvas.Clip>
				<RectangleGeometry Rect="0,100,120,200"/>
			</Canvas.Clip>
			<Minutes:NumericTag x:Name="numericTag" HorizontalAlignment="Left"  Margin="80,100,0,30" RenderTransformOrigin="0,0" DataContext="{Binding}">
				<Minutes:NumericTag.RenderTransform>
					<TransformGroup>
						<ScaleTransform/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform Y="-30"/>
					</TransformGroup>
				</Minutes:NumericTag.RenderTransform>
			</Minutes:NumericTag>
		</Canvas>
        <Border Width="100" Height="100" BorderThickness="1,0,0,0" CornerRadius="5" VerticalAlignment="Top">
        	<Border.Background>
        		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        			<GradientStop Color="Gainsboro" Offset="0"/>
        			<GradientStop Color="#FFBFBFBF" Offset="1"/>
        		</LinearGradientBrush>
        	</Border.Background>
        	<Border.BorderBrush>
        		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        			<GradientStop Color="#FFBFBFBF"/>
        			<GradientStop Color="Gainsboro" Offset="1"/>
        		</LinearGradientBrush>
        	</Border.BorderBrush>
            <Border.OpacityMask>
                <RadialGradientBrush>
                    <GradientStop Color="#FFB94444" Offset="0.8"/>
                    <GradientStop Color="#00FFFFFF" Offset="0.798"/>
                </RadialGradientBrush>
            </Border.OpacityMask>
            
        </Border>
        <ed:Arc Width="70" Height="70"  ArcThickness="1" ArcThicknessUnit="Percent" Stretch="None" StartAngle="0" EndAngle="{Binding RemainingTimeAngle}" VerticalAlignment="Top" Margin="0,15,0,0">
        	<ed:Arc.Stroke>
        		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        			<GradientStop Color="Gainsboro" Offset="0"/>
        			<GradientStop Color="Gainsboro" Offset="1"/>
        		</LinearGradientBrush>
        	</ed:Arc.Stroke>
        	<ed:Arc.Fill>
        		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        			<GradientStop Color="Gainsboro" Offset="0"/>
        			<GradientStop Color="#FFBFBFBF" Offset="1"/>
        			<GradientStop Color="#FFC3C3C3" Offset="1"/>
        		</LinearGradientBrush>
        	</ed:Arc.Fill>
        </ed:Arc>
    </Grid>
</Window>
